package com.yunxi.yunxicaiproject.Controller;

import com.yunxi.yunxicaiproject.entity.dto.LoginDTO;
import com.yunxi.yunxicaiproject.service.ILoginService;
import com.yunxi.yunxicaiproject.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/ai")
public class LoginController {
    @Autowired
    ILoginService ILoginService;

    @PostMapping("/login")
    public R login(@RequestBody LoginDTO loginDTO) {

        return ILoginService.login(loginDTO);
    }
}
